package com.yfp.goods.api;

import com.yfp.common.core.constant.ServiceNameConstants;
import com.yfp.common.core.domain.R;
import com.yfp.goods.api.factory.RemoteComboFallbackFactory;
import com.yfp.goods.domain.Combo;
import com.yfp.goods.domain.ComboGroupDTO;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 
 * @version 1.0
 * @date 2024-07-13 14:23
 */
@FeignClient(contextId = "remoteComboService", value = ServiceNameConstants.GOODS_SERVICE, fallbackFactory = RemoteComboFallbackFactory.class)
public interface RemoteComboService {
    @GetMapping("/combo/ids")
    public R<List<String>> getComboIds();

    @GetMapping("/combo/groupShelf/list")
    @Operation(summary = "获取上架团餐列表")
    R<List<ComboGroupDTO>> getGroupShelfComboList();

    @GetMapping("/combo/list/ids")
    R<List<Combo>> getComboByIds(@RequestParam("comboIds") List<String> comboIds);
}
